package Constructor;

public class Teacher {
    String name;
    double score1;
    double score2;

    public Teacher(String name, double score1, double score2)
    {
        this.name = name;
        this.score1 = score1;
        this.score2 = score2;
    }
    public void sum()
    {
        System.out.println(name + "总成绩为" + (score1 + score2)/2);
    }
}
